package com.one.common.common.system;


import com.one.common.common.system.model.response.BannerResponse;
import com.one.common.common.system.model.response.DefaultResponse;
import com.one.common.common.system.model.response.OrderStateResponse;
import com.one.common.common.system.model.response.QiNiuTokenResponse;
import com.one.common.common.system.model.response.SessionResponse;
import com.one.common.common.system.model.response.UpdateVersionResponse;
import com.one.common.model.http.base.CommonParam;
import com.one.common.model.http.base.CommonResponse;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * Author: zhulunjun
 * Email: zhulunjun@qq.com
 * CreateDate: 2018/11/20 10:50
 * Description： 系统通用接口
 **/
public interface SystemApi {
    /**
     * 获取session
     */
    String GET_SESSION = "system.getsession";
    @POST("system/getsession")
    Observable<CommonResponse<SessionResponse>> getSession(@Body CommonParam params);

    /**
     * 获取token
     */
    String GET_QINIU_TOKEN = "qiniu.getbuckettokentoapp";
    @POST("ycp/pbasic-server/qiniu/getbuckettokentoapp")
    Observable<CommonResponse<QiNiuTokenResponse>> getQiNiuToken(@Body CommonParam params);


    String GET_MODIFYMOBILE_QINIU_TOKEN = "qiniu.getBucketTokenToAppModifyMobile";
    @POST("ycp/pbasic-server/qiniu/getBucketTokenToAppModifyMobile")
    Observable<CommonResponse<QiNiuTokenResponse>> getQiNiuTokenModifyMobile(@Body CommonParam params);


    /**
     * 获取首页轮播图
     */
    String GET_BANNER = "advertising.shufflingofhome";
    @POST("ycp/presource-server/advertising/shufflingofhome")
    Observable<CommonResponse<BannerResponse>> getBanner(@Body CommonParam params);


    /**
     * 版本升级
     */
    String UPDATE_VERSION = "appupgrade.getappUpgrade";
    @POST("ycp/presource-server/appupgrade/getappUpgrade")
    Observable<CommonResponse<UpdateVersionResponse>> updateVersion(@Body CommonParam params);

    /**
     * 定位上传
     */
    String UPLOAD_GPS = "user.saveusergpsinfo";
    @POST("ycp/cuser-server/user/saveusergpsinfo")
    Observable<CommonResponse<DefaultResponse>> uploadGps(@Body CommonParam params);
    /**
     * 查询是否存在运输中的订单
     */
    String GET_ORDER_STATE = "publicgoods.istransiting";
    @POST("ycp/corder-server/publicgoods/istransiting")
    Observable<CommonResponse<OrderStateResponse>> getOrderState(@Body CommonParam params);

}
